
{% extends "base.html" %}

{% block content %}

<h1> PreferIt </h1>
<p> Choose your destiny.  Enter what you're looking for tonight (e.g., "cheap thai food", "dive bar")</p>

<table border = "1">
  <tr>
    <th><strong>User</strong></th>
    <th>Preference</th>
  </tr>
    {% for user_in_session in user_in_sessions %}
        <tr class="altrow">
          <td> {{ user_in_session.user.user.username }} </td>
          <td>
            {% if user_in_session.preference %}
                 {{ user_in_session.preference }}
            {% else %}
                Undecided
            {% endif %}
          </td>
        </tr>
    {% endfor %}
</ul>
</table>

{% if form %}
<form method='post' action=''>
  {% csrf_token %}
  {{ form.as_table }}
  <input type="submit" value="Submit Preference">
</form>

{% endif %}

{% endblock %}
